<div class="content">
	<div class="eight columns">
		<script type="text/javascript">
		$(function() {
			//More Button
			$('.more').live("click",function() {
				var ID = $(this).attr("id");
				if(ID) {
					$("#more"+ID).html('<img src="{$url}/images/preloader.gif" />');

					$.ajax({
						type: "POST",
						url: "{$url}/requests/discover{$public}.php",
						data: "loadmore="+ ID + "&u={$topic}", 
						cache: false,
						success: function(html) {
							$("#loadmore").append(html);
							$("#more"+ID).remove();
							
							// Reload the timeago plugin
							jQuery("div.timeago").timeago();
							
							// Reload the reply button function (hide)
							jQuery(".reply-container").hide();
							jQuery(".media-container").hide();
						}
					});
				}
				return false;
			});
		});
		</script>
		
		<script type="text/javascript">
		$(function() {
			//Post Button
			$('.post-button').live("click",function() {
				var ID = $(this).attr("id");
				var text = $('textarea#post' + ID + '').val();
				if(ID) {
					$("#post-loader"+ID).html('<img src="{$url}/images/preloader.gif" />');

					$.ajax({
						type: "POST",
						url: "{$url}/requests/post_me.php",
						data: "postmsg="+ encodeURIComponent(text), 
						cache: false,
						success: function(html) {
							$("#new-post").prepend(html);
						    $("#post-loader"+ID).remove();
							
							// Reload the timeago plugin
							jQuery("div.timeago").timeago();
						}
					});
				}
				return false;
			});
		});
		</script>
		<script type="text/javascript">
		$(function() {
			//Report Button
			$('.report-button').live("click",function() {
				var ID = $(this).attr("id");
				if(ID) {
					$.ajax({
						type: "POST",
						url: "{$url}/requests/report.php",
						data: "report="+ ID, 
						cache: false,
						success: function(html) {
							$("#new-post").prepend(html);
						}
					});
				}
				return false;
			});
		});
		</script>
		<div class="timeline" id="loadmore">
			<div class="meTitle"><h3>{$topic}</h3><div class="subMeTitle">topic</div></div>
			{$top}
			{$error}
			<div class="new-post" id="new-post"></div>
			{$message}
			{$rows}
		</div>
		<div id="more{$idn}" class="morebox" {$hide}>
			<div class="more" id="{$idn}"><div class="more-button">More results</div></div>
		</div>
	</div>
	<div class="four columns">
		<h3>Discover</h3>
		<div class="subMeTitle">latest people interested in this topic</div>
		<div class="divider"></div>
		<div class="sidebar">{$latest}</div>
		<div class="divider"></div>
		<div class="sidebar">
			<div class="discover-input">
				<input type="text" id="hashtag" value="search a topic" />
			</div>
		</div>
	</div>
</div>